<?php
use \yii\helpers\Url;
use \yii\helpers\Html;
use \common\models\Catalog;
use \common\models\Post;
use \common\models\Banner;
use \common\models\Links;
use yii\bootstrap\BootstrapAsset;
use yii\web\JqueryAsset;
?><!--home-->
<?//= $mdu['首页简介']?>
<!--<div>--><?//=$conf['site_copyright'];?><!--</div>-->
<?php
$photos = Banner::photos('首页');
?>
<div  class="banner">
    <div class="hd">
        <ul>
            <?php foreach ($photos as $photo){?>
                <li></li>
            <?php }?>
        </ul>
    </div>
    <div class="bd">
        <ul>
            <?php foreach ($photos as $photo){?>
                <li><a href="<?=$photo['url']?$photo['url']:'#'?>"><img src="<?=$photo['src']?>" /></a></li>
            <?php }?>
        </ul>
    </div>
    <a class="prev" href="javascript:void(0)"></a>
    <a class="next" href="javascript:void(0)"></a>
</div>
<script type="text/javascript">
    jQuery(".banner").slide({mainCell:".bd ul",autoPlay:true,effect:"fold",interTime:"2500"});
</script>
<!--<div class="online_box">-->
<!--    <img src="images/online.png">-->
<!--    <div>-->
<!--        <a href="http://wpa.qq.com/msgrd?V=3&uin=--><?//=$conf['QQ1']?><!--&Site=QQ客服&Menu=yes" target="_blank"><p><img src="images/online_contact.png"><span>科牌-小燕</span></p></a>-->
<!--        <a href="http://wpa.qq.com/msgrd?V=3&uin=--><?//=$conf['QQ2']?><!--&Site=QQ客服&Menu=yes" target="_blank"><p><img src="images/online_contact.png"><span>科牌-小燕</span></p></a>-->
<!--    </div>-->
<!--</div>-->
    <div class="content wrapper">
        <div class="content_box">
            <?=$mdu['首页_为什么选择科牌货架']?>
            <div class="product_display clearfix">
                <?=$this->render('/public/product');?>
            </div>
            <?=$mdu['店铺陈列解决方案']?>
            <?=$mdu['合作品牌']?>
            <?=$mdu['服务流程']?>
            <div class="news_box_list clearfix">
                <div class="news_box ">
                    <?=$mdu['公司新闻']?>
                    <div class="bottom">
                        <div class="bd">
                            <ul class="picList">
                                <?php $company_news = Post::items('company_news',10);
                                foreach($company_news as $post){?>
                                    <li>
                                        <img src="/images/radio.png">
                                        <a href="<?=Url::to(['/post', 'id' => $post['id']])?>" target="_blank"><?=$post['title']?></a>
                                    </li>
                                <?php }?>
                            </ul>
                        </div>
                    </div>
                </div>
                <script type="text/javascript">
                    jQuery(" .bottom").slide({mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:true,vis:4,trigger:"click"});
                </script>
                <div class="news_box ">
                    <?=$mdu['行业新闻']?>
                    <div class="bottom">
                        <div class="bd">
                            <ul class="picList">
                                <?php $trace_news = Post::items('trade_news',10);
                                foreach($trace_news as $post){?>
                                    <li>
                                        <img src="/images/radio.png">
                                        <a href="<?=Url::to(['/post', 'id' => $post['id']])?>" target="_blank"><?=$post['title']?></a>
                                    </li>
                                <?php }?>
                            </ul>
                        </div>
                    </div>
                </div>
                <script type="text/javascript">
                    jQuery(" .bottom").slide({mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:true,vis:4,trigger:"click"});
                </script>
                <div class="news_box last">
                    <div class="top clearfix">
                        <p class="tit">常见问题<br><span>COMMON PROBLEMS</span></p>
                        <a href="<?=Url::to(['/catalog','alias'=>'question'])?>"><img src="/images/more.png"></a>
                    </div>
                    <div class="bottom">
                        <?php $questions = Post::items('question',2);
                        foreach($questions as $question){?>
                            <div>
                                <p class="question"><span>问</span><a href="<?=Url::to(['/post', 'id' => $question['id']])?>"><?=$question['title']?></a></p>
                                <p class="answer"><span>答</span><a href="<?=Url::to(['/post', 'id' => $question['id']])?>"><?=$question['intro']?></a></p>
                            </div>
                        <?php }?>
                    </div>
                </div>
            </div>
        </div>
    </div>